<?php 
    if(isset($_SESSION["jjusername"])){
        $sqlb="select count(-1) as c from basket where mid =".getmid($_SESSION["jjusername"])." and flag=0";
        $rsb=$db->getData($sqlb,true);
        $bcount=$rsb["c"];
    }else{
        $bcount=0;
    }
?>
<script>
	$(document).ready(function(){
		$("#quit").click(function(){
		    $.ajax({
		        url:"quit.php",
		        type:"post",
		        success:function(data){
		            if(data==1){
		                location.href="login.php";
		            }
		        }
		    });
		})
	});
</script>
<div class="hmtop">
			<!--顶部导航条 -->
			<div class="am-container header">
				<ul class="message-l">
					<div class="topMessage">
						<div class="menu-hd">
						<?php if(isset($_SESSION["jjusername"])){ ?>
						      欢迎：<a href="person/index.php"><?php echo $_SESSION["jjusername"] ?></a>
						      <a id="quit" href="javascript:;" target="_top" class="h">退出</a>
						      <?php }else{ ?>
							<a href="login.php" target="_top" class="h">亲，请登录</a>
							
							<?php } ?>
							<a href="register.php" target="_top">免费注册</a>
						</div>
					</div>
				</ul>
				<ul class="message-r">
					<div class="topMessage home">
						<div class="menu-hd"><a href="http://www.z.com/myshop" target="_top" class="h">商城首页</a></div>
					</div>
					<div class="topMessage my-shangcheng">
						<div class="menu-hd MyShangcheng"><a href="person/index.php" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
					</div>
					<div class="topMessage mini-cart">
						<div class="menu-hd"><a id="mc-menu-hd" href="shopcart.php" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h"><?php echo $bcount; ?></strong></a></div>
					</div>
					<div class="topMessage favorite">
						<div class="menu-hd"><a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
				</ul>
				</div>

				<!--悬浮搜索框-->

				<div class="nav white">
					<div class="logo"><img src="images/logo.png" /></div>
					<div class="logoBig">
						<li><a href="http://www.z.com/myshop"><img src="images/<?php echo $web["logo"] ?>" /></a></li>
					</div>

					<div class="search-bar pr">
						<a name="index_none_header_sysc" href="#"></a>
						<form action="search.php" method="post">
							<input id="searchInput" name="goodskey" value="<?php echo isset($s) ? $s : ""; ?>" type="text" placeholder="搜索" autocomplete="off">
							<input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="submit">
						</form>
					</div>
				</div>

				<div class="clear"></div>
			</div>